package com.zhenmaitang.clinic_sys.mapper;

import com.zhenmaitang.clinic_sys.entity.UriPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UriPermissionMapper {
    
    List<UriPermission> findAll();
    
    UriPermission findById(Integer id);
    
    List<UriPermission> findByUri(String uri);
    
    List<UriPermission> findByMethod(String method);
    
    List<UriPermission> findByPermissionCode(String permissionCode);
    
    /**
     * 根据URI和HTTP方法查找权限
     */
    List<UriPermission> findByUriAndMethod(@Param("uri") String uri, @Param("method") String method);
    
    int insert(UriPermission uriPermission);
    
    int update(UriPermission uriPermission);
    
    int deleteById(Integer id);
}